---
title: EFTPopup reason-code selection
summary: Presents a caller-supplied reason-code list and confirms the selected code back to the hosting page.
status: draft
owner: <owner>
last_reviewed: 2026-08-21
library: SAIF.Presentation.Web.Controls.PopUps.Infragistics111
reference_type: package
operation_id: OP-2
trigger: Hosting page sets Active = True, DDLSource, TitleText, DDLDescription, optional DefaultCode.
---

# EFTPopup reason-code selection

This operation renders a generic reason-code selection popup and returns the chosen code to the hosting page; it performs no delegated data access of its own.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-2 |
| **Trigger** | Hosting page sets `Active = True`, `DDLSource` (a caller-supplied list), `TitleText`, `DDLDescription`, optional `DefaultCode`. |
| **Inputs** | `DDLSource`, `TitleText`, `DDLDescription`, `DefaultCode` |
| **Outputs** | `ConfirmAction(Confirm, NotifyEventArgs)` |
| **Primary components** | `EFTPopup.CreateChildControls`, `EFTPopup.LoadCodeTables`, `EFTPopup.SaveButtonClick`, `EFTPopup.CancelButtonClick` |
| **Entry point** | `SAIF.Presentation.Web.Controls.PopUps.Infragistics111\EFTPopup.vb` |

## Steps

1. `CreateChildControls()` parses the ASCX, finds `lblErrorMsg`/`lblTitleBar`/`lblDDLDescr`/`ddlReason`, wires `ddlReasonIndexChanged`, `cmdSave.Click → SaveButtonClick`, `cmdCancel.Click → CancelButtonClick`, then calls `LoadCodeTables()`.
2. `LoadCodeTables()` binds `ddlReason` from the caller-supplied `DDLSource` and selects `DefaultCode` if set, else the first item (and stores that as the new `DefaultCode`).
3. On dropdown change, the `DefaultCode` view-state value is updated to the newly selected value.
4. `Render()` (when `Active`) sets label texts from `TitleText`/`ErrorMsg`/`DDLDescription`, positions the popup, re-enables Save/Cancel, renders, and focuses `ddlReason` (or `ControlWithFocus`) via `igedit_getById`/`document.getElementById`.
5. On Save (`SaveButtonClick`):
   - Calls the no-op `EditNotifyControls()` validation, which always returns `True` — no actual validation logic is implemented*.
   - Raises `ConfirmAction(True, New NotifyEventArgs(ddlReason.SelectedValue))`.
6. On Cancel (`CancelButtonClick`):
   - Raises `ConfirmAction(False, ...)` with the current selection.
   - Calls `ResetControls()` (clears `ErrorMsg`/`ControlWithFocus`).

## Process flow

The following diagram visualizes the reason-code selection flow.

```mermaid
flowchart TD
	Start([Hosting page sets Active = True, DDLSource]) --> Create[CreateChildControls parses ASCX]
	Create --> Load[LoadCodeTables binds ddlReason]
	Load --> Render[Render popup, focus dropdown]
	Render --> Action{Save or Cancel}
	Action -->|Save| Validate[EditNotifyControls no-op, always True]
	Validate --> Confirm([ConfirmAction True with NotifyEventArgs])
	Action -->|Cancel| Reset[ResetControls]
	Reset --> Cancel([ConfirmAction False])
```

## Failure and edge-case behavior

- `EditNotifyControls()` is a no-op validation stub that always returns `True` — unclear whether this is intentional (validation deferred to hosting page) or an incomplete implementation**.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

## Sources
- `SAIF.Presentation.Web.Controls.PopUps.Infragistics111\EFTPopup.vb`
- `SAIF.Presentation.Web.Controls.PopUps.Infragistics111\EFTPopup.ascx`
